package com.globalresources.dao.inface;

import java.util.List;

import com.globalresources.po.MessageReceiver;
import com.trg.dao.dao.standard.GenericDAO;

/**
 * @author aaron.lu(luzhiyuan) E-mail:atyuan.lu@gmail.com
 * @since 创建时间：Aug 7, 2009 3:31:53 PM
 */
public interface IMessageReceiverDao extends GenericDAO<MessageReceiver, Integer> {
	
	/**
	 * <p>查询消息接受者
	*@author aaron.lu(luzhiyuan)
	*@param username
	*@param isReceive
	*@param isRead
	*@param isDelete
	*@param isDeleteMessage
	*@param pageSize
	*@param startRow
	*@return
	 */
	public List<MessageReceiver> getMessagerReceivers(String username, Byte isReceive, Byte isRead, Byte isDelete, Byte isDeleteMessage, int pageSize, int startRow);
	
	/**
	 * <p>查询消息接受者总纪录数
	*@author aaron.lu(luzhiyuan)
	*@param username
	*@param isReceive
	*@param isRead
	*@param isDelete
	*@param isDeleteMessage
	*@return
	 */
	public int countMessageReceiver(String username, Byte isReceive, Byte isRead, Byte isDelete, Byte isDeleteMessage);
	/**
	 * <p>更新实体
	*@author songduanlei@gmail.com
	*@return
	 */
	public void saveOrUpdateMessageReceiver(MessageReceiver messageReceiver);
	
	/**
	 * <p>查询消息接受者
	*@author liming.yu(yulm88@gmail.com)
	*@param keyWord  在Message表的tile和content中匹配的字符串
	*@param username
	*@param isReceive
	*@param isRead
	*@param isDelete
	*@param isDeleteMessage
	*@param pageSize
	*@param startRow
	*/
	public List<MessageReceiver> getMatchingMessagerReceivers(String keyWord,String username, Byte isReceive, Byte isRead, Byte isDelete, Byte isDeleteMessage, int pageSize, int startRow);
	
	/**
	 * <p>查询消息接受者总纪录数
	*@author liming.yu(yulm88@gmail.com)
	*@param keyWord 在Message表的tile和content中匹配的字符串
	*@param username
	*@param isReceive
	*@param isRead
	*@param isDelete
	*@param isDeleteMessage
	*@return
	 */
	public int countMatchingMessageReceiver(String keyWord,String username, Byte isReceive, Byte isRead, Byte isDelete, Byte isDeleteMessage);

}
